package com.jzg.jcptadmin.data.network;

import com.jzg.jcptadmin.app.UpdateApp;
import com.jzg.jcptadmin.base.BaseObject;
import com.jzg.jcptadmin.data.ResponseJson;
import com.jzg.jcptadmin.data.vo.AddTaskResultData;
import com.jzg.jcptadmin.data.vo.AdmixedData;
import com.jzg.jcptadmin.data.vo.AppraisersData;
import com.jzg.jcptadmin.data.vo.Canpei;
import com.jzg.jcptadmin.data.vo.CarConfigModel;
import com.jzg.jcptadmin.data.vo.CarDetails;
import com.jzg.jcptadmin.data.vo.CarManagerData;
import com.jzg.jcptadmin.data.vo.CarTypeModel;
import com.jzg.jcptadmin.data.vo.CarTypeSelectModel;
import com.jzg.jcptadmin.data.vo.CheckPriceBean;
import com.jzg.jcptadmin.data.vo.CheckVinBean;
import com.jzg.jcptadmin.data.vo.ChooseResultData;
import com.jzg.jcptadmin.data.vo.CityItem;
import com.jzg.jcptadmin.data.vo.CityList;
import com.jzg.jcptadmin.data.vo.EvaluateResultBean;
import com.jzg.jcptadmin.data.vo.FastOnlineData;
import com.jzg.jcptadmin.data.vo.HistoryList;
import com.jzg.jcptadmin.data.vo.MakeList;
import com.jzg.jcptadmin.data.vo.ModelList;
import com.jzg.jcptadmin.data.vo.OfflineDetectionData;
import com.jzg.jcptadmin.data.vo.OrderStatisticsData;
import com.jzg.jcptadmin.data.vo.PlateTypeModel;
import com.jzg.jcptadmin.data.vo.ProvinceList;
import com.jzg.jcptadmin.data.vo.RepairBean;
import com.jzg.jcptadmin.data.vo.ReplyInfo;
import com.jzg.jcptadmin.data.vo.SourceData;
import com.jzg.jcptadmin.data.vo.StatusData;
import com.jzg.jcptadmin.data.vo.StyleList;
import com.jzg.jcptadmin.data.vo.SuccessData;
import com.jzg.jcptadmin.data.vo.SuccessValuationData;
import com.jzg.jcptadmin.data.vo.TaskViewData;
import com.jzg.jcptadmin.data.vo.TotalCountInfo;
import com.jzg.jcptadmin.data.vo.TouXiangInfo;
import com.jzg.jcptadmin.data.vo.UpLoadCarData;
import com.jzg.jcptadmin.data.vo.UpLoadImageData;
import com.jzg.jcptadmin.data.vo.UploadVideoData;
import com.jzg.jcptadmin.data.vo.User;
import com.jzg.jcptadmin.data.vo.ValuationDetailData;
import com.jzg.jcptadmin.data.vo.VehicleCheckData;
import com.jzg.jcptadmin.data.vo.VinDetails;
import com.jzg.jcptadmin.data.vo.WorkInfo;
import com.squareup.okhttp.RequestBody;

import java.util.List;
import java.util.Map;

import retrofit.http.FieldMap;
import retrofit.http.FormUrlEncoded;
import retrofit.http.Multipart;
import retrofit.http.POST;
import retrofit.http.PartMap;
import rx.Observable;

/**
 * Created by jzg on 2015/12/22.
 */
public interface HttpService {
    @FormUrlEncoded
    @POST("/App/UserHandler.ashx")
    public Observable<User> login(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/UserHandler.ashx")
    public Observable<BaseObject> updateNickname(@FieldMap Map<String, String> params);

    //        @POST("/App/UserHandler.ashx")
//        public Observable<TouXiangInfo> updateImage(@Body com.jzg.jcpt.data.vo.Body body);
    @Multipart
    @POST("/App/UserHandler.ashx")
    public Observable<TouXiangInfo> updateImage(@PartMap Map<String, RequestBody> params);

    @FormUrlEncoded
    @POST("/app/Caching/GetMakeModelStyleAll.ashx")
    public Observable<MakeList> loadBrand(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/app/Caching/GetMakeModelStyleAll.ashx")
    public Observable<ModelList> loadModel(@FieldMap Map<String, String> params);

    //    @POST("/app/car/GetGroupStyleByModelId.ashx")
    @FormUrlEncoded
    @POST("/app/Caching/GetMakeModelStyleAll.ashx")
    public Observable<StyleList> loadStyle(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/AreaCity.ashx")
    public Observable<ProvinceList> loadProvince(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/AreaCity.ashx")
    public Observable<CityList> loadCity(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/InTimeAppraise.ashx")
    public Observable<ValuationDetailData> loadValuationDetail(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/AppraiseRecord.ashx")
    public Observable<HistoryList> loadHistory(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/FastOnLineList.ashx")
    public Observable<FastOnlineData> loadFastOnlineData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/FastOnLineOperate.ashx")
    public Observable<CarDetails> loadFastOnlineDeatilData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/SaveSpecialtyOffLine.ashx")
    public Observable<OfflineDetectionData> loadOfflineDetectionData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/SaveSpecialtyOffLine.ashx")
    public Observable<SourceData> loadSourceData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/SaveSpecialtyOffLine.ashx")
    public Observable<SuccessData> CommitData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/FastOnLineStatus.ashx")
    public Observable<StatusData> StatusData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/SaveSpecialtyOffLine.ashx")
    public Observable<TaskViewData> TaskViewData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/SaveSpecialtyOffLine.ashx")
    public Observable<SuccessData> DeleteData(@FieldMap Map<String, String> params);

    /* @POST("/App/UploadForApp.ashx")
     public Observable<UpLoadImageData> UpLoadImage(@QueryMap Map<String, File> params);*/
    @Multipart
    @POST("/App/UploadForApp.ashx")
    public Observable<UpLoadImageData> UpLoadImage(@PartMap Map<String, RequestBody> params);

    @Multipart
    @POST("/App/uploadvideofile.ashx")
    public Observable<UploadVideoData> UpLoadVideo(@PartMap Map<String, RequestBody> params);//上传视频


    @FormUrlEncoded
    @POST("/App/SaveCarBase.ashx")
    public Observable<UpLoadCarData> UpLoadCarData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/GetRegisterList.ashx")
    public Observable<CarManagerData> loadCarListData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/GetTotalCount.ashx")
    public Observable<TotalCountInfo> loadTotalCount(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/IsWorkEveryDay.ashx")
    public Observable<WorkInfo> loadWokeInfo(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/APP/config/EvaluateConfig.ashx")
    public Observable<ChooseResultData> loadChooseResult(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/app/vinanalysisStyleHandler.ashx")
    public Observable<VinDetails> loadVinResult(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/GetRegisterDetail.ashx")
    public Observable<VehicleCheckData> loadCarData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/TaskSave20160303.ashx")
    public Observable<AddTaskResultData> KsSubmitData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/ForgetPwd.ashx")
    public Observable<SuccessData> changePd(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/FastOnLineOperate.ashx")//操作
    public Observable<SuccessData>OperationData(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/app/isAccident.ashx")//操作
    public Observable<CheckVinBean>checkVinAccident(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/App/FastOnLineOperate.ashx")//评估
    public Observable<SuccessValuationData>OperationData1(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/App/EvaluateTask.ashx")//流程2.0评估
    public Observable<EvaluateResultBean> evaluateData(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/app/FastOnLineOperate.ashx")//线上退回 审核驳回
    public Observable<SuccessData>OperationBack(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/App/GetCarProperty.ashx")//获取参配
    public Observable<Canpei>CanPeiData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/PriceWarning.ashx")//评估价格预警
    Observable<CheckPriceBean> checkPrice(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/GetRepairLog.ashx")//维保记录查询
    Observable<RepairBean> getRepairLog(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/SaveReply.ashx")
    public Observable<ReplyInfo> postReplay(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/App/InTimeAppraise.ashx")
    public Observable<ValuationDetailData> LoadValuationDetailData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/Config/GetVersion.ashx")
    public Observable<UpdateApp> isUpdate(@FieldMap Map<String, String> params);
   /* @Multipart
    @POST("/APP/UploadZIP.ashx")
    public Observable<SuccessData> upLoadTaskData(@PartMap Map<String, RequestBody> params);*/

    @Multipart
    @POST("/app/TaskSave20160303.ashx")
    public Observable<SuccessData> upLoadTaskData(@PartMap Map<String, RequestBody> params);
    @Multipart
    @POST("/app/TaskSaveSimple.ashx")
    public Observable<SuccessData> upLoadTaskData1(@PartMap Map<String, RequestBody> params);

    @FormUrlEncoded
    @POST("/app/SaveOffLine.ashx")
    public Observable<SuccessData> upLoadOffOnLineData(@FieldMap Map<String, String> params);//线下提交

    @FormUrlEncoded
    @POST("/App/FastOnLineOperate.ashx")
    public Observable<CarDetails> LoadOffOnLineTaskViewData(@FieldMap Map<String, String> params);


    @FormUrlEncoded
    @POST("/app/TaskSaveSimple.ashx")
    public Observable<SuccessData> upLoadQuickTaskData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/FastOnLineList.ashx")
    public Observable<FastOnlineData> loadFastOnlineDataNew(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/FastOnLineOperate.ashx")//线上线下认领以及认领审核操作
    public Observable<SuccessData>OperationDataNew(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/SaveSpecialtyOffLine.ashx")
    public Observable<OfflineDetectionData> loadOfflineDetectionNew(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/SaveSpecialtyOffLine.ashx")
    public Observable<OfflineDetectionData> loadOfflineDetectionNewSearchByVin(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/SaveSpecialtyOffLine.ashx")
    public Observable<SuccessData> clainOfflineTask(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/AreaCity.ashx")
    public Observable<CityItem> getCityData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/OrderStat.ashx")
    public Observable<OrderStatisticsData> getOrderData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/APP/Statistics/AppraiserStatistics.ashx")
    public Observable<AppraisersData> getAppraisersData(@FieldMap Map<String, String> params);//评估师统计

    @FormUrlEncoded
    @POST("/APP/Statistics/TaskSourceStatistics.ashx")
    public Observable<AppraisersData> getOrganizationData(@FieldMap Map<String, String> params);//评估师统计

    @FormUrlEncoded
    @POST("/App/FastOnLineList.ashx")
    public Observable<FastOnlineData> loadOnLineEvaluationData(@FieldMap Map<String, String> params);//加载检测估值列表


    @FormUrlEncoded
    @POST("api/CarStyle/StyleCompare") //车辆参配
//    @POST("/api/CarTypeInfo/StyleCompare") //车辆参配 pad 2.0
    public Observable<ResponseJson<AdmixedData>> getAdmixedData(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/api/CarStyle/GetDiff") //备选车型 根据车系请求车型列表和差异配置
    public Observable<CarTypeSelectModel> getCarDiff(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/api/CarStyle/GetNameplate")
    public Observable<PlateTypeModel> getPlateTypes(@FieldMap Map<String, String> params);//获取车辆铭牌型号列表

    @FormUrlEncoded
    @POST("/api/CarStyle/GetMakeModelInfo")
    public Observable<CarTypeModel> getCarTypes(@FieldMap Map<String, String> params);//根据vin和铭牌获取车辆品牌车系信息

/*    @FormUrlEncoded
    @POST("api/CarStyle/GetParams")//("/api/CarTypeInfo/GetParams")
    public Observable<CarConfigModel> getCarConfig(@FieldMap Map<String, String> params);//获取变速箱、驱动方式、排量*/

    @FormUrlEncoded
    @POST("/app/Caching/GetMakeModelStyleAll.ashx")
    public Observable<List<CarConfigModel.MemberValueBean>> getCarConfig(@FieldMap Map<String, String> params);//获取变速箱、驱动方式、排量
}
